/*
 * Copyright (C) 2009 Christoph Caks
 *
 * This file is part of GLWAK.
 *
 * GLWAK is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * GLWAK is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with GLWAK.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
 * WindowsContext.h
 *
 *  Created on: 31.07.2009
 *      Author: Christoph Caks
 */


#ifndef WINDOWSCONTEXT_H_
#define WINDOWSCONTEXT_H_

#include "Log.h"

#include "Windows.h"

#include "Context.h"
#include "windows/WindowsWindow.h"
#include "windows/WindowsHelper.h"

namespace glwak {

namespace priv {

class WindowsContext : public Context {
public:
	WindowsContext();
	WindowsContext( Window *_window );
	virtual ~WindowsContext();

// from Context
	void initialize();
	void makeCurrent();
	void swapBuffers();
	void *getExtensionAddress( const char *_extension );

// from Disposable
	void dispose();

private:
	WindowsWindow *window;
	HDC deviceContext;
	HGLRC glRenderingContext;

};

} // namespace priv

} // namespace glwak

#endif /* WINDOWSCONTEXT_H_ */
